package com.honglang.module.article.entity;



import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="articleCategory")
public class ArticleCategories {

	/**
	 * @uml.property  name="CategoryName"
	 */
	private String categoryName;


	/**
	 * @uml.property  name="id"
	 */
	private Integer id;
	
	
	
	/**
	 * Getter of the property <tt>CategoryName</tt>
	 * @return  Returns the categoryName.
	 * @uml.property  name="CategoryName"
	 */
	@Column
	public String getCategoryName() {
		return categoryName;
	}

	/**
	 * Setter of the property <tt>CategoryName</tt>
	 * @param CategoryName  The categoryName to set.
	 * @uml.property  name="CategoryName"
	 */
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}


	/**
	 * Getter of the property <tt>id</tt>
	 * @return  Returns the id.
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Integer getId() {
		return id;
	}

	/**
	 * Setter of the property <tt>id</tt>
	 * @param id  The id to set.
	 * @uml.property  name="id"
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	
	
	public boolean equals(Object object){
		return ((ArticleCategories)object).getCategoryName().equals(this.getCategoryName());
	
	}
	
	
	public int hashCode(){
		
		return this.getCategoryName().hashCode();
	}
	
}
